package com.lcxw.hxzb.friendcircle.project.system.service.impl;

import java.util.List;

import com.lcxw.hxzb.friendcircle.common.utils.DateUtils;
import com.lcxw.hxzb.friendcircle.project.system.mapper.YwpdLovesMapper;
import com.lcxw.hxzb.friendcircle.project.system.service.IYwpdLovesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lcxw.hxzb.friendcircle.project.system.domain.YwpdLoves;

/**
 * 情侣关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-27
 */
@Service
public class YwpdLovesServiceImpl implements IYwpdLovesService
{
    @Autowired
    private YwpdLovesMapper ywpdLovesMapper;

    /**
     * 查询情侣关系
     * 
     * @param lovesId 情侣关系ID
     * @return 情侣关系
     */
    @Override
    public YwpdLoves selectYwpdLovesById(Long lovesId)
    {
        return ywpdLovesMapper.selectYwpdLovesById(lovesId);
    }

    /**
     * 查询情侣关系列表
     * 
     * @param ywpdLoves 情侣关系
     * @return 情侣关系
     */
    @Override
    public List<YwpdLoves> selectYwpdLovesList(YwpdLoves ywpdLoves)
    {
        return ywpdLovesMapper.selectYwpdLovesList(ywpdLoves);
    }

    /**
     * 新增情侣关系
     * 
     * @param ywpdLoves 情侣关系
     * @return 结果
     */
    @Override
    public int insertYwpdLoves(YwpdLoves ywpdLoves)
    {
        ywpdLoves.setCreateTime(DateUtils.getNowDate());
        return ywpdLovesMapper.insertYwpdLoves(ywpdLoves);
    }

    /**
     * 修改情侣关系
     * 
     * @param ywpdLoves 情侣关系
     * @return 结果
     */
    @Override
    public int updateYwpdLoves(YwpdLoves ywpdLoves)
    {
        return ywpdLovesMapper.updateYwpdLoves(ywpdLoves);
    }

    /**
     * 批量删除情侣关系
     * 
     * @param lovesIds 需要删除的情侣关系ID
     * @return 结果
     */
    @Override
    public int deleteYwpdLovesByIds(Long[] lovesIds)
    {
        return ywpdLovesMapper.deleteYwpdLovesByIds(lovesIds);
    }

    /**
     * 删除情侣关系信息
     * 
     * @param lovesId 情侣关系ID
     * @return 结果
     */
    @Override
    public int deleteYwpdLovesById(Long lovesId)
    {
        return ywpdLovesMapper.deleteYwpdLovesById(lovesId);
    }
}
